Skip to content

feat(proto): add SessionInjection + trigger_traceparent trace fields (RIG-2891) - #700

Open
rigel-mintaka wants to merge 1 commit into
mainfrom
compass-server/rig-2891-trace-proto-fields
Open

feat(proto): add SessionInjection + trigger_traceparent trace fields (RIG-2891)#700
rigel-mintaka wants to merge 1 commit into
mainfrom
compass-server/rig-2891-trace-proto-fields

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

T4 completion of the T4b trace-continuity record docs/designs/platform/compass-server-runner-otel/design.md (RIG-2685): the two remaining additive proto3 fields of the cross-lane trace-continuity contract, after the agent.proto control-op pair (SteerControl.traceparent=3 / DeliverControl.traceparent=4) that #694 already carries.

Public observation (OQ2 = yes)SessionInjection.traceparent (compass.proto, field 4): the Server's active-span W3C traceparent, denormalized onto the SubscribeAgentSession observation so a subscriber joins the injection to the message's server-side trace. Additive id-typed sibling to from_handle; empty when the Server had no active span. This is the public-API leg — a new DL row (DL-279) records Matt's OQ2 ruling, since the platform record stayed Ledger-impact: none.

Causal-link sourceCommsCallRequest.trigger_traceparent (agent_gateway.proto, field 10): the delivered message's traceparent, re-attached by the agent on an outbound call so the Server links the reply's fresh trace back to its trigger (a trace terminates at the turn; a reply is a new causally-linked root, never an unbounded child span). Empty on a human-seeded first turn. Field 10 leaves 7-9 for the in-flight org-management oneof arms (RIG-2673); numbers are frozen (DL-186 / OQ-1b), so 10 is stable.

Pure-additive proto3, buf-breaking-safe (the breaking gate is removed pre-dogfood, SEA-1922); moon run compass-proto:gen regenerates the public Go (go/gen), internal Go (go/internal/gen), and both TS lanes (compass-agent, compass-client). Generated accessors GetTraceparent() / GetTriggerTraceparent() compile.

Verification: compass-proto:gen/drift/gen-fence/lint pass, go build ./... + go vet ./... clean, compass-agent + compass-client typecheck clean, design-ledger-gate snapshot green (242 rows, DL-279 anchor resolves).

Unblocks compass-agent RIG-2871 (T3 decode/emit) — regen against this once merged. Server-side stamping/link logic (T5, RIG-2892) is the follow-up that populates these fields.

Spec-impact: none. Refs RIG-2891, RIG-2685

Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

RIG-2891

RIG-2685

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-server-rig-2891-trac.compass-eng-docs.pages.dev

Deployed from compass-server/rig-2891-trace-proto-fields at c78adbc.

Changed pages:

rigel-mintaka added a commit that referenced this pull request Aug 28, 2026
…t id-typed (RIG-2891)

Review-fix on PR #700. The sole review finding (low) noted DL-279's prose called SessionInjection.traceparent an "id-typed sibling to from_handle" — imprecise, since traceparent is a W3C trace-context token (00-<trace-id>-<span-id>-<flags>), not an identifier, and from_handle is itself a handle string, not an id. Reworded to "Additive string scalar beside from_handle (a W3C trace-context token ..., not an identifier)". Ledger prose only; no contract change.

design-ledger-gate green (anchor resolves, no dup).

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-2891-trace-proto-fields branch from 4b7aa54 to 9933a33 Compare August 28, 2026 03:29
@rigel-mintaka

Copy link
Copy Markdown
Contributor Author

Review loop complete (self-driven review agent, one round + fix) — all-clear at the high+medium floor.

ReviewPR700Trace: 0 high / 0 medium / 1 low. Field numbers verified against the on-disk message definitions (SessionInjection.traceparent=4 next-free, no collision; CommsCallRequest.trigger_traceparent=10 with 7-9 left free for the in-flight org-management oneof, declared outside the oneof as a plain scalar). Gen lanes mechanically consistent; gen-fence intact (internal agent_gateway absent from the public/client gen).

  • LOW — DL row prose called traceparent an "id-typed sibling to from_handle." Fixed: reworded to "additive string scalar beside from_handle (a W3C trace-context token, not an identifier)."

Rebased onto current main; the ledger row is DL-282 — main's #684 took DL-279 (test-harness) and #695 took DL-281 (board ingestion) since first submit, so the traceparent row renumbered from DL-279 to DL-282 (new ## Observability & tracing section). design-ledger-gate green, no duplicate. merge=BLOCKED on review-required only; holding at your gate.

The agent.proto SteerControl/DeliverControl traceparent pair stays the separate #694 (already review-clean). On merge of both, compass-agent RIG-2871 regenerates against the complete contract.

@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-2891-trace-proto-fields branch 2 times, most recently from 41d1ff5 to fbe08c0 Compare August 28, 2026 05:39
…(RIG-2891)

T4 completion of the T4b trace-continuity record `docs/designs/platform/compass-server-runner-otel/design.md` (RIG-2685): the two remaining additive proto3 fields of the cross-lane trace-continuity contract, after the agent.proto control-op pair (SteerControl.traceparent=3 / DeliverControl.traceparent=4) that #694 already carries.

**Public observation (OQ2 = yes)** — `SessionInjection.traceparent` (`compass.proto`, field 4): the Server's active-span W3C `traceparent`, denormalized onto the SubscribeAgentSession observation so a subscriber joins the injection to the message's server-side trace. An additive string scalar beside `from_handle` (a W3C trace-context token, not an identifier); empty when the Server had no active span. This is the public-API leg — a new DL row (DL-283) records Matt's OQ2 ruling, since the platform record stayed `Ledger-impact: none`.

**Causal-link source** — `CommsCallRequest.trigger_traceparent` (`agent_gateway.proto`, field 10): the delivered message's `traceparent`, re-attached by the agent on an outbound call so the Server links the reply's fresh trace back to its trigger (a trace terminates at the turn; a reply is a new causally-linked root, never an unbounded child span). Empty on a human-seeded first turn. Field 10 leaves 7-9 for the in-flight org-management oneof arms (RIG-2673); numbers are frozen (DL-186 / OQ-1b), so 10 is stable.

Pure-additive proto3, buf-breaking-safe (the breaking gate is removed pre-dogfood, SEA-1922); `moon run compass-proto:gen` regenerates the public Go (`go/gen`), internal Go (`go/internal/gen`), and both TS lanes (`compass-agent`, `compass-client`). Generated accessors `GetTraceparent()` / `GetTriggerTraceparent()` compile.

Verification: `compass-proto:gen`/`drift`/`gen-fence`/`lint` pass, `go build ./...` + `go vet ./...` clean, `compass-agent` + `compass-client` typecheck clean, `design-ledger-gate` green (DL-283 anchor resolves, no duplicate). Rebased onto current main `9755815f`; the ledger row is DL-283 — the DL-279/280 test-harness rows, DL-281 board-ingestion, and DL-282 GTK4-shell rows all landed since first submit, so the traceparent row settled at the next free number.

Unblocks compass-agent RIG-2871 (T3 decode/emit) — regen against this once merged. Server-side stamping/link logic (T5, RIG-2892) is the follow-up that populates these fields.

Spec-impact: none. Refs RIG-2891, RIG-2685

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-server/rig-2891-trace-proto-fields branch from fbe08c0 to c78adbc Compare August 29, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant